#ifndef PHYS_ENGINE_H
#define PHYS_ENGINE_H

#define HIDE_STYLE 0
#define THIN_STYLE 1
#define THICK_STYLE 2


#define XY_INIT 1
#define LA_INIT 2

#include <cmath>
#include "phys_solve_math.h"

namespace phys_engine
{
	const double tick=0.001;
	const double const_g=490;
	
	class _stick
	{
		private:
			double _accx,_accy,_angacc;
		public:
			_stick(int init, double input_mass, double input_a, double input_b,
				double input_c, double input_d, int input_show_style=THIN_STYLE);

			int _show_style;
			double _mass;
			double _xc,_yc,_length,_angle;
			double _velx,_vely,_angvel;

			simulate_point end_point_1(void) const; // l+minus
			simulate_point end_point_2(void) const; // l+plus

			void _force(double _effx,double _effy,double _divx,double _divy);
			void _move(void);
	};
	
	simulate_point stick_end_point_1(_stick *_s);
	simulate_point stick_end_point_2(_stick *_s);
	void stick_force(_stick *_s,double _effx,double _effy,double _divx,double _divy);
	void stick_move(_stick *_s);
	
	
}

#endif